﻿using System.Windows.Controls;
using System.Windows.Media;

namespace Ree7.TileToolkit.TileTemplates
{
    /// <summary>
    /// This tile template is designed to be a pixel perfect copy of WP7's native tiles with counters
    /// </summary>
    public partial class LargeContentAndLogoTileTemplate : UserControl
    {
        public LargeContentAndLogoTileTemplate()
        {
            InitializeComponent();

            // Default values
            Background = null;
            Logo = null;
            Title = "";
            Text = "";
        }

        /// <summary>
        /// You can set any kind of brush as the background (Image, Gradient, SolidColor)
        /// or just do not set the property to leave it transparent (and use the phone theme color)
        /// </summary>
        public new Brush Background
        {
            get
            {
                return LayoutRoot.Background;
            }
            set
            {
                LayoutRoot.Background = value;
            }
        }

        /// <summary>
        /// The logo that stands to the left of the text
        /// </summary>
        public ImageSource Logo
        {
            get
            {
                return TileLogo.Source;
            }
            set
            {
                TileLogo.Source = value;
            }
        }

        /// <summary>
        /// The first line of text of the tile
        /// </summary>
        public string Title
        {
            get
            {
                return TileTitle.Text;
            }
            set
            {
                TileTitle.Text = value;
            }
        }

        /// <summary>
        /// The second line of text of the tile
        /// </summary>
        public string Text
        {
            get
            {
                return TileSubtitle.Text;
            }
            set
            {
                TileSubtitle.Text = value;
            }
        }
    }
}
